package com.yueyang.sojourn.server.service.sojourn.order;

import com.yueyang.sojourn.server.model.po.SojournOrderRefund;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author Andy.yang
 * @version v1
 * @summary
 * @Copyright (c) 2019, YueYang Group All Rights Reserved.
 * @since 2020/3/29
 */
@Mapper
public interface SojournOrderRefundMapper {
    /**
     * 创建退款单
     * @param refund
     * @return
     */
    int insert(SojournOrderRefund refund);

    /**
     * 查询退款单
     * @param id
     * @return
     */
    SojournOrderRefund selectByPrimaryKey(Long id);

    /**
     * 根据退款单号查询
     * @param sn
     * @return
     */
    SojournOrderRefund findByRefundSn(@Param("sn") String sn);

    /**
     * 根据订单id查询
     * @param orderId
     * @return
     */
    SojournOrderRefund findByOrderId(@Param("orderId") Long orderId);
}
